<template>
	<view class="wrapper-two">
		<view class="wt-item"
			v-for="item in itemList"
			:key="item._id">
			<image :src="item.coverpic"
				mode=""></image>
			<text>{{item.name}}</text>
			<view class="item-row">
				<view class="row-item">
					<text>{{item.pageview < 0 ? item.pageview * -1 : item.pageview}}</text>
					<image src="../../static/img/caipusousuo_slices/mengbanzu278.png"
						mode=""></image>
				</view>
				<view class="row-item">
					<text>{{item.pageview < 0 ? item.pageview * -1 : item.pageview}}</text>
					<image src="../../static/img/caipusousuo_slices/mengbanzu279.png"
						mode=""></image>
				</view>

			</view>
		</view>

	</view>
</template>

<script>
	export default {
		name: "menu-grid",
		props: {
			itemList: {
				type: Array
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss"
	scoped>
	.wrapper-two {
		display: flex;
		flex-wrap: wrap;
		width: 686rpx;
		height: 700rpx;
		margin: 48rpx auto;

		.wt-item {
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			align-items: center;
			width: 336rpx;
			height: 332rpx;
			margin-right: 14rpx;
			margin-bottom: 36rpx;

			&:nth-of-type(2n) {
				margin-right: 0;
			}

			image {
				width: 334rpx;
				height: 248rpx;
				border-radius: $uni-border-radius-lg;
			}

			text {
				width: 334rpx;
				text-align: left;
				font-size: 30rpx;
				color: $uni-text-color-1;
			}

			.item-row {
				width: 334rpx;
				display: flex;
				align-items: center;

				.row-item {
					// width: 334rpx;
					display: flex;
					align-items: center;
					margin-right: 60rpx;

					text {
						width: fit-content;
						font-size: 22rpx;
						color: #aaa;
						margin-right: 14rpx;
					}

					image {
						width: 24rpx;
						height: 24rpx;
					}
				}
			}
		}
	}
</style>
